import {request1, request,server,serverUpload } from '../utils/request.js'


export  function getCode(data){ 
	return request({
		url:'/api/oauth/getWeChartSmallProgramLoginInfo',
		method: 'GET',
		data
	})
}
export  function login(data){ // 登陆
	return request1({
		url:'/api/user/dcH5WechatLogin',
		method: 'POST',
		data
	})
}

// 图片上传
export  function uploadImages(data){ 
	return serverUpload({
		url:'/api/file/uploadImages',
		method: 'POST',
		data
	})
}

//订单支付 /api/pay/appletsWechatOrderPay
export  function partnerAppletsWechatOrderPay(data){ 
	return server({
		url:'/api/pay/partnerAppletsWechatOrderPay',
		method: 'POST',
		data
	})
}

// 获取个人信息
export  function searchUserInfoById(data){ 
	return request({
		url:'/api/user/searchUserInfoById',
		method: 'GET',
		data
	})
}

// 修改个人信息 /api/user/updateUserInfo
export  function updateUserInfo(data){ 
	return server({
		url:'/api/user/updateUserInfo',
		method: 'POST',
		data
	})
}

// 获取热销
export  function getHomeDataInfo(data){ 
	return request({
		url:'/api/plugs/getHomeDataInfo',
		method: 'GET',
		data
	})
}
// 获取店铺 /api/plugs/getBusinessInfo'
export  function getBusinessInfoList(data){ 
	return request({
		url:'/api/plugs/getBusinessInfo',
		method: 'GET',
		data
	})
}
// 获取首页轮播
export  function getRecommen(data){ 
	return request({
		url:'/api/plugs/getApplicationPlugsRecommendedList',
		method: 'GET',
		data
	})
}

// 获取分类
export  function getCategory(data){ 
	return request({
		url:'/api/plugs/getShopGoodCategoryList',
		method: 'GET',
		data
	})
}
// 获取分类下面的商品 '/api/plugs/searchPlugsGoodsByCategoryId'
export  function searchPlugsGoodsByCategoryId(data){ 
	return request({
		url:'/api/plugs/searchPlugsGoodsByCategoryId',
		method: 'GET',
		data
	})
}
// 商品加入购物车  insertPlugsShopCart
export  function insertPlugsShopCart(data){ 
	return server({
		url:'/api/plugs/insertPlugsShopCart',
		method: 'POST',
		data
	})
}
// 搜索商品 goodSearch
export  function goodSearch(data){ 
	return request({
		url:'/api/plugs/goodSearch',
		method: 'GET',
		data
	})
}
//查看购物车 getPlugsShopCartByUserId
export  function getPlugsShopCartByUserId(data){ 
	return request({
		url:'/api/plugs/getPlugsShopCartByUserId',
		method: 'GET',
		data
	})
}
// 删除购物车 /api/plugs/delPlugsShopCart
export  function delPlugsShopCart(data){ 
	return request({
		url:'/api/plugs/delPlugsShopCart',
		method: 'POST',
		data
	})
}
// 修改购物车 /api/plugs/updatePlugsShopCart
export  function updatePlugsShopCart(data){ 
	return server({
		url:'/api/plugs/updatePlugsShopCart',
		method: 'POST',
		data
	})
}
// 查看商品详情 /api/plugs/searchPlugsGoodsById
export  function searchPlugsGoodsById(data){ 
	return request({
		url:'/api/plugs/searchPlugsGoodsById',
		method: 'GET',
		data
	})
}
// 获取产品规格 searchPlugsGoodsSpecificationByGoodsId
export  function searchPlugsGoodsSpecificationByGoodsId(data){ 
	return request({
		url:'/api/plugs/searchPlugsGoodsSpecificationByGoodsId',
		method: 'GET',
		data
	})
}
// 查询配送费  /api/platform/getShippingFeeEstimate
export  function getShippingFeeEstimate(data){ 
	return server({
		url:'/api/platform/getShippingFeeEstimate',
		method: 'POST',
		data
	})
}
// 创建订单 /api/order/createOrder
export  function createOrder(data){ 
	return server({
		url:'/api/order/createOrder',
		method: 'POST',
		data
	})
}
//订单支付 /api/pay/appletsWechatOrderPay
export  function appletsWechatOrderPay(data){ 
	return server({
		url:'/api/pay/appletsWechatOrderPay',
		method: 'POST',
		data
	})
}

// 获取订单 /api/order/searchUserOrderListByStatus
export  function searchUserOrderListByStatus(data){ 
	return request({
		url:'/api/order/searchUserOrderListByStatus',
		method: 'GET',
		data
	})
}
// 取消订单 cancelOrder
export  function cancelOrder(data){ 
	return request({
		url:'/api/order/cancelOrder',
		method: 'GET',
		data
	})
}
// 删除订单 delOrder
export  function delOrder(data){ 
	return request({
		url:'/api/order/delOrder',
		method: 'POST',
		data
	})
}
// 申请退款 userApplyOrderRefund
export  function userApplyOrderRefund(data){ 
	return request({
		url:'/api/order/userApplyOrderRefund',
		method: 'POST',
		data
	})
}
// 加入收藏 api/plugs/insertPlugsCollect
export  function insertPlugsCollect(data){ 
	return server({
		url:'/api/plugs/insertPlugsCollect',
		method: 'POST',
		data
	})
}

// 收藏列表 api/plugs/searchPlugsCollectByUserId  
export  function searchPlugsCollectByUserId(data){ 
	return request({
		url:'/api/plugs/searchPlugsCollectByUserId',
		method: 'GET',
		data
	})
}

// 删除收藏 delPlugsCollect
export  function delPlugsCollect(data){ 
	return request({
		url:'/api/plugs/delPlugsCollect',
		method: 'POST',
		data
	})
}
// 获取优惠券 /api/plugs/passwordCouponsExchange
export  function passwordCouponsExchange(data){ 
	return request({
		url:'/api/plugs/passwordCouponsExchange',
		method: 'GET',
		data
	})
}

// /api/plugs/searchPlugsCouponsByUserId
export  function searchPlugsCouponsByUserId(data){ 
	return request({
		url:'/api/plugs/searchPlugsCouponsByUserId', 
		method: 'GET',
		data
	})
}

// /api/plugs/searchPlugsCouponsByBusinessId 领券中心
export  function searchPlugsCouponsByBusinessId(data){ 
	return request({
		url:'/api/plugs/searchPlugsCouponsByBusinessId',
		method: 'GET',
		data
	})
}
// 领取优惠券 /api/plugs/receiveCoupons
export  function receiveCoupons(data){ 
	return request({
		url:'/api/plugs/receiveCoupons',
		method: 'POST',
		data
	})
}
// getPlugsConfigInfo
export  function getPlugsConfigInfo(data){ 
	return request({
		url:'/api/plugs/getPlugsConfigInfo',
		method: 'GET',
		data
	})
}
// /api/pay/getUserPayReacord
export  function getUserPayReacord(data){ 
	return request({
		url:'/api/pay/getUserPayReacord',
		method: 'GET',
		data
	})
}
// /api/user/getUserConsumptionRecordList
export  function getUserConsumptionRecordList(data){ 
	return request({
		url:'/api/user/getUserConsumptionRecordList',
		method: 'GET',
		data
	})
}
// getIntegralGoodsList 积分
export  function getIntegralGoodsList(data){ 
	return request({
		url:'/api/plugs/getIntegralGoodsList',
		method: 'GET',
		data
	})
}
// getUserIntegralRecordList 积分记录
export  function getUserIntegralRecordList(data){ 
	return request({
		url:'/api/plugs/getUserIntegralRecordList',
		method: 'GET',
		data
	})
}

// /api/plugs/searchPlugsFormList 获取表单列表
export  function searchPlugsFormList(data){ 
	return request({
		url:'/api/plugs/searchPlugsFormList',
		method: 'GET',
		data
	})
}

// /api/plugs/insertPlugsFormData
export  function insertPlugsFormData(data){ 
	return server({
		url:'/api/plugs/insertPlugsFormData',
		method: 'POST',
		data
	})
}

// 提交记录
export  function getUserSubmitFormDataList(data){ 
	return request({
		url:'/api/plugs/getUserSubmitFormDataList',
		method: 'GET',
		data
	})
}
// searchPlugsPracticeQuestionBankList 获取科目下面的题库
export  function searchPlugsPracticeQuestionBankList(data){ 
	return request({
		url:'/api/plugs/searchPlugsPracticeQuestionBankList',
		method: 'GET',
		data
	})
}
// searchPlugsPracticeTestQuestionsManageList 获取题库下的试题
export  function getPracticeTestQuestionsByquestionBankList(data){ 
	return request({
		url:'/api/plugs/getPracticeTestQuestionsByquestionBankList',
		method: 'GET',
		data
	})
}

// /api/plugs/getPlugsPracticeStudentByCard

export  function getPlugsPracticeStudentByCard(data){ 
	return request({
		url:'/api/plugs/getPlugsPracticeStudentByCard',
		method: 'GET',
		data
	})
}

// /api/plugs/updatePlugsPracticeStudent 

export  function updatePlugsPracticeStudent(data){ 
	return server({
		url:'/api/plugs/updatePlugsPracticeStudent',
		method: 'POST',
		data
	})
}

// /api/oauth/userIsLogin 判断token是否过期

export  function userIsLogin(){ 
	return request({
		url:'/api/oauth/userIsLogin',
		method: 'GET',
	})
}

// checkPracticeStudentBindingState 验证是否绑定
export  function checkPracticeStudentBindingState(data){ 
	return request({
		url:'/api/plugs/checkPracticeStudentBindingState',
		method: 'GET',
		data
	})
}

// searchPlugsPracticeSubjectList  获取科目
export  function searchPlugsPracticeSubjectList(data){ 
	return request({
		url:'/api/plugs/searchPlugsPracticeSubjectList',
		method: 'GET',
		data
	})
}

// api/plugs/searchPlugsPracticeStudentById  获取学员科目 
export  function searchPlugsPracticeStudentById(data){ 
	return request({
		url:'/api/plugs/searchPlugsPracticeStudentById',
		method: 'GET',
		data
	})
}

// insertPlugsPracticeStudent 新增学员
export  function insertPlugsPracticeStudent(data){ 
	return server({
		url:'/api/plugs/insertPlugsPracticeStudent',
		method: 'POST',
		data
	})
}

// insertPlugsPracticeStudentTestRecord   练习记录插入

export  function insertPlugsPracticeStudentTestRecord(data){ 
	return server({
		url:'/api/plugs/insertPlugsPracticeStudentTestRecord',
		method: 'POST',
		data
	})
}  
// /api/plugs/insertPlugsPracticeStudentTestRecordDetails 

export  function insertPlugsPracticeStudentTestRecordDetails(data){ 
	return server({
		url:'/api/plugs/insertPlugsPracticeStudentTestRecordDetails',
		method: 'POST',
		data
	})
}  

// /api/pay/getCommonPayInfoByDataId 查询用户科目有没有支付
export  function getCommonPayInfoByDataId(data){ 
	return request({
		url:'/api/pay/getCommonPayInfoByDataId',
		method: 'GET',
		data
	})
}
// /api/plugs/getPracticeStudentTestCount  获取科目练习记录数量
export  function getPracticeStudentTestCount(data){ 
	return request({
		url:'/api/plugs/getPracticeStudentTestCount',
		method: 'GET',
		data
	})
}

// 科目详情   searchPlugsPracticeSubjectById

export  function searchPlugsPracticeSubjectById(data){ 
	return request({
		url:'/api/plugs/searchPlugsPracticeSubjectById',
		method: 'GET',
		data
	})
}

// searchPlugsPracticeTestPaperList  试卷列表
export  function searchPlugsPracticeTestPaperList(data){ 
	return request({
		url:'/api/plugs/searchPlugsPracticeTestPaperList',
		method: 'GET',
		data
	})
}
// /api/plugs/insertPlugsPracticeTestRecord  創建考试记录
export  function insertPlugsPracticeTestRecord(data){ 
	return server({
		url:'/api/plugs/insertPlugsPracticeTestRecord',
		method: 'POST',
		data
	})
}  
// /api/plugs/insertPlugsPracticeTestRecordDetails 

export  function insertPlugsPracticeTestRecordDetails(data){ 
	return server({
		url:'/api/plugs/insertPlugsPracticeTestRecordDetails',
		method: 'POST',
		data
	})
}  

// /api/plugs/searchPlugsPracticeTestRecordList  考试记录列表
export  function searchPlugsPracticeTestRecordList(data){ 
	return request({
		url:'/api/plugs/searchPlugsPracticeTestRecordList',
		method: 'GET',
		data
	})
}

// /api/plugs/searchPlugsPracticeTestRecordById  查询考试记录详情
export  function searchPlugsPracticeTestRecordById(data){ 
	return request({
		url:'/api/plugs/searchPlugsPracticeTestRecordById',
		method: 'GET',
		data
	})
}

// getUserCollectTestQuestionsList 查询用户试题列表
export  function getUserCollectTestQuestionsList(data){ 
	return request({
		url:'/api/plugs/getUserCollectTestQuestionsList',
		method: 'GET',
		data
	})
}
//    取消收藏
export  function cancelCollectByDataId(data){ 
	return request({
		url:'/api/plugs/cancelCollectByDataId',
		method: 'POST',
		data
	})
} 


// getPracticeStudentTestRecordList  获取用户练习记录
export  function getPracticeStudentTestRecordList(data){ 
	return request({
		url:'/api/plugs/getPracticeStudentTestRecordList',
		method: 'GET',
		data
	})
}
// searchPlugsPracticeStudentTestRecordById 按id查询练习记录详情
export  function searchPlugsPracticeStudentTestRecordById(data){ 
	return request({
		url:'/api/plugs/searchPlugsPracticeStudentTestRecordById',
		method: 'GET',
		data
	})
}
// updatePlugsPracticeStudentTestRecordDetails 修改详情
export  function updatePlugsPracticeStudentTestRecordDetails(data){ 
	return server({
		url:'/api/plugs/updatePlugsPracticeStudentTestRecordDetails',
		method: 'POST',
		data
	})
} 
// searchPlugsPracticeStudentTestRecordDetailsById 
export  function searchPlugsPracticeStudentTestRecordDetailsById(data){ 
	return request({
		url:'/api/plugs/searchPlugsPracticeStudentTestRecordDetailsById',
		method: 'GET',
		data
	})
}
// getPracticeStudentTestRecordDetailsByPracticeId 根据练习记录ID和试题ID查询联系记录详细信息
export  function getPracticeStudentTestRecordDetailsByPracticeId(data){ 
	return request({
		url:'/api/plugs/getPracticeStudentTestRecordDetailsByPracticeId',
		method: 'GET',
		data
	})
}

// 修改练习记录 updatePlugsPracticeStudentTestRecord
export  function updatePlugsPracticeStudentTestRecord(data){ 
	return server({
		url:'/api/plugs/updatePlugsPracticeStudentTestRecord',
		method: 'POST',
		data
	})
} 
// getStudentPracticeTestRecordList   获取用户考试记录
export  function getStudentPracticeTestRecordList(data){ 
	return request({
		url:'/api/plugs/getStudentPracticeTestRecordList',
		method: 'GET',
		data
	})
}

// updatePlugsPracticeTestRecordDetails  修改考试记录详情

export  function updatePlugsPracticeTestRecordDetails(data){ 
	return server({
		url:'/api/plugs/updatePlugsPracticeTestRecordDetails',
		method: 'POST',
		data
	})
}

export  function updatePlugsPracticeTestRecord(data){ 
	return server({
		url:'/api/plugs/updatePlugsPracticeTestRecord',
		method: 'POST',
		data
	})
}

// getPlugsPracticeTestRecordDetailsByPracticeId
export  function getPlugsPracticeTestRecordDetailsByPracticeId(data){ 
	return request({
		url:'/api/plugs/getPlugsPracticeTestRecordDetailsByPracticeId',
		method: 'GET',
		data
	})
}

// searchPlugsPracticeTestRecordDetailsById
export  function searchPlugsPracticeTestRecordDetailsById(data){ 
	return request({
		url:'/api/plugs/searchPlugsPracticeTestRecordDetailsById',
		method: 'GET',
		data
	})
}

// searchPlugsPracticeTestPaperById  id查询考卷
export  function searchPlugsPracticeTestPaperById(data){ 
	return server({
		url:'/api/plugs/searchPlugsPracticeTestPaperById',
		method: 'GET',
		data
	})
}
export  function insertPlugsPracticeStudentTestRecordDetailsList(data){ 
	return server({
		url:'/api/plugs/insertPlugsPracticeStudentTestRecordDetailsList',
		method: 'POST',
		data
	})
}
export  function insertPlugsPracticeTestRecordDetailsList(data){ 
	return server({
		url:'/api/plugs/insertPlugsPracticeTestRecordDetailsList',
		method: 'POST',
		data
	})
}

export  function updateBatchPlugsPracticeTestRecordDetails(data){ 
	return server({
		url:'/api/plugs/updateBatchPlugsPracticeTestRecordDetails',
		method: 'POST',
		data
	})
}

export  function updateBatchPlugsPracticeStudentTestRecordDetails(data){ 
	return server({
		url:'/api/plugs/updateBatchPlugsPracticeStudentTestRecordDetails',
		method: 'POST',
		data
	})
}

